package com.example.filesplit.demos.entity;

import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.apache.poi.xwpf.usermodel.XWPFTable;
import org.apache.poi.xwpf.usermodel.XWPFTableRow;

import java.util.List;

public class TableDataResponse {
    private XWPFDocument document;
    private XWPFTable table;
    private List<XWPFTableRow> rows;
    private List<List<String>> fileData; // 添加用于存储单元格数据的字段

    public TableDataResponse(XWPFDocument document, XWPFTable table, List<XWPFTableRow> rows, List<List<String>> fileData) {
        this.document = document;
        this.table = table;
        this.rows = rows;
        this.fileData = fileData;
    }

    public XWPFDocument getDocument() {
        return document;
    }

    public XWPFTable getTable() {
        return table;
    }

    public List<XWPFTableRow> getRows() {
        return rows;
    }

    public List<List<String>> getFileData() {
        return fileData; // 返回所有单元格的数据
    }
}